package homework.day08;

import homework.day08.bean.Person;
import homework.day08.bean.Student;
import homework.day08.iface.IFlyAble;
import homework.day08.iface.ISingAble;

/**
 * @author ThinkBook
 */
public class Test06 {
    public static void main(String[] args) {
        Person s1 = new Student("zuizui",21,"20211612666","100");
        if (s1 instanceof Student){
            Student s2 = (Student) s1;
            s1.run();
        }else if (s1 instanceof IFlyAble){
            IFlyAble s3 = (IFlyAble) s1;
            s3.fly();
        }else if (s1 instanceof ISingAble){
           ISingAble s3 = (ISingAble) s1;
            s3.sing();
        }

    }
}
